<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true">
  <div region="center" style="padding:0px;border:0px">
  <t:datagrid name="dictGroupList" checkbox="true" fitColumns="true" title="实验室课表" actionUrl="teachCourseScheduleController.do?datagrid" idField="id" fit="true" queryMode="group">
   <t:dgCol title="主键"  field="id"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="学期"  query="true" field="semester"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="周次"  field="weekNumber"  queryMode="single"  width="120"></t:dgCol> 
   <t:dgCol title="班级"  field="className"  query="true" queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="日期"  field="courseDate" formatter="yyyy-MM-dd"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="上课节次"  field="courseOrderName"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="人数"  field="peopleCount"   queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="实验课程"  field="lessonInfo.lessonName"   queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="实验项目"  field="teachItem.itemName"   queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="任课教师"  field="teacher.realName" query="true"   queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="实验室"  field="lab.name"  query="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="房间"  field="lab.roomNo"   queryMode="single"  width="120"></t:dgCol>
   <t:dgToolBar title="同步课表数据" icon="icon-put" funname="importData"></t:dgToolBar>
   <t:dgToolBar title="导入" icon="icon-put" funname="ImportXls"></t:dgToolBar>
   </t:datagrid>
  </div>
 </div>
 <script type="text/javascript">
 $(document).ready(function(){
 		//给时间控件加上样式
 			$("#dictGroupListtb").find("input[name='createDate']").attr("class","Wdate").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
 });
 
 
 function importData(){
		
		ajaxLoading("正在导入数据请稍后...");
		
		$.ajax({
			url:"teachCourseScheduleController.do?importData",
			success:function(data){
				data = $.parseJSON(data);
				tip(data.msg);
				reloadTable();
				
				ajaxLoadEnd(); 
			}
		});
	} 
 
//导入
 function ImportXls() {
 	openuploadwin('Excel导入', 'teachCourseScheduleController.do?upload', "dictGroupList");
 }
 
 </script>